package cn.biao.epic.sys.core.auth;

import cn.biao.epic.base.auth.model.LoginUser;
import cn.biao.epic.base.auth.service.AuthService;
import cn.biao.epic.core.util.SpringContextHolder;
import cn.biao.epic.sys.core.auth.cache.SessionManager;
import cn.biao.epic.sys.modular.system.mapper.MenuMapper;
import cn.biao.epic.sys.modular.system.mapper.UserMapper;
import cn.biao.epic.sys.modular.system.service.DictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.DependsOn;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Auther Uncle_Z
 * @date 2019/12/4 16:43
 * @Email:2545375@qq.com
 * @Descrition
 */
@Service
@DependsOn("springContextHolder")
@Transactional(readOnly = true)
public class AuthServiceImpl implements AuthService {

    @Autowired
    private UserMapper userMapper;

    @Autowired
    private MenuMapper menuMapper;

    @Autowired
    private DictService dictService;

    @Autowired
    private SessionManager sessionManager;


    public static  AuthService me(){
        return SpringContextHolder.getBean(AuthService.class);
    }

    @Override
    public String login(String username, String password) {
        return null;
    }

    @Override
    public String login(String username) {
        return null;
    }

    @Override
    public void addLoginCookie(String token) {

    }

    @Override
    public void logout() {

    }

    @Override
    public void logout(String token) {

    }

    @Override
    public LoginUser user(String account) {
        return null;
    }

    @Override
    public List<String> findPermissionsByRoleId(Long roleId) {
        return null;
    }

    @Override
    public boolean check(String[] roleNames) {
        return false;
    }

    @Override
    public boolean checkAll() {
        return false;
    }
}
